Skip to content

gui/export-world-map: precise locations of bridges; materials of bridges and roads - #1647

Open
Nekkowe wants to merge 6 commits into
DFHack:masterfrom
Nekkowe:bridge-export-exact-position
Open

Nekkowe wants to merge 6 commits into
DFHack:masterfrom
Nekkowe:bridge-export-exact-position

Conversation

@Nekkowe

@Nekkowe Nekkowe commented Oct 5, 2026 •

Copy link
Copy Markdown

This PR addresses the position of bridges in the geodata export (as discussed on Discord), pinpointing them down to the midmap tile rather than the world tile as before.

As a result, they now correctly coincide with roads crossing rivers (diamonds = old, starbursts = new):
image

image

It also adds an attribute for the exact materials of bridges and roads (e.g. mudstone, pear wood, willow...) using dfhack.matinfo.decode/2 for the names.

@Nekkowe Nekkowe changed the title export-world-map: precise locations of bridges, down from world tiles to midmap tiles gui/export-world-map: precise locations of bridges, down from world tiles to midmap tiles Oct 6, 2026
@Nekkowe Nekkowe changed the title gui/export-world-map: precise locations of bridges, down from world tiles to midmap tiles gui/export-world-map: precise locations of bridges; materials of bridges and roads Oct 6, 2026

@chdoc chdoc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good, the requested changes are mostly nitpicks.

Comment thread internal/export-world-map/export-roads.lua Outdated
Comment thread internal/export-world-map/export-roads.lua Outdated
Comment thread internal/export-world-map/export-roads.lua
local material = ""

if df.item_type[square.item_type] == "WOOD" then
subtype = "wooden"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a strong preference, but I would prefer:

Suggested change
subtype = "wooden"
subtype = "wood"

@Nekkowe Nekkowe Oct 6, 2026 •

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the precedent of "paved" for paved roads, I'd argue for "wooden" for wooden bridges here - the subtype attribute being an adjective makes for nicer labeling in GIS software.
(e.g. "construction_subtype" || " " || "construction_type" => "paved road", "wooden bridge", "stone bridge" etc.)

(The material attribute, of course, uses the noun; "peach wood", "willow", "mudstone" etc.)

Comment thread internal/export-world-map/export-roads.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants